<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>轮播效果3.0插件</title>
    <link rel="stylesheet" href="./css/swiper-bundle.min.css">
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }



    .swiper-container {
        width: 400px;
        height: 400px;
        margin-top: 30px;
    }

    .swiper-slide img {
        width: 400px;
        height: 400px;
    }

    .swiper-container {
        --swiper-theme-color: #bde05c;
        --swiper-pagination-color: #73ec97b2;
        border: yellowgreen 3px solid;
        /* 两种都可以 */
    }
</style>

<body>
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide"><img src="./img/1.jfif" alt=""></div>
            <div class="swiper-slide"><img src="./img/2.jfif" alt=""></div>
            <div class="swiper-slide"><img src="./img/3.jfif" alt=""></div>
        </div>
        <!-- 如果需要分页器 -->
        <div class="swiper-pagination"></div>

        <!-- 如果需要导航按钮 -->
        <div class="swiper-button-prev"></div>
        <div class="swiper-button-next"></div>


    </div>
    <script src="./js/swiper-bundle.min.js"></script>
    <script>
        var mySwiper = new Swiper('.swiper-container', {
            loop: true, // 循环模式选项
            autoplay:true,
            effect : 'flip',
            // 如果需要分页器
            pagination: {
                el: '.swiper-pagination',
                dynamicBullets: true,
                clickable: true,
            },

            // 如果需要前进后退按钮
            navigation: {
                nextEl: '.swiper-button-next',
                prevEl: '.swiper-button-prev',
            }


        })
       
    </script>
</body>

</html>